{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "\n",
    "## GeostatsPy: Monte Carlo Simulation for Subsurface Data Analytics in Python \n",
    "\n",
    "\n",
    "### Michael Pyrcz, Associate Professor, University of Texas at Austin \n",
    "\n",
    "#### [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleScholar](https://scholar.google.com/citations?user=QVZ20eQAAAAJ&hl=en&oi=ao) | [Book](https://www.amazon.com/Geostatistical-Reservoir-Modeling-Michael-Pyrcz/dp/0199731446) | [YouTube](https://www.youtube.com/channel/UCLqEr-xV-ceHdXXXrTId5ig)  | [LinkedIn](https://www.linkedin.com/in/michael-pyrcz-61a648a1)\n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### PGE 383 Exercise: Monte Carlo Simulation for Subsurface Data Analytics in Python \n",
    "\n",
    "Here's a simple workflow, demonstration of Monte Carlo simulation for subsurface uncertainty modeling workflows. This should help you get started with building subsurface models that integrate uncertainty sources.  \n",
    "\n",
    "#### Monte Carlo Simulation\n",
    "\n",
    "Definition: random sampling from a distribution\n",
    "\n",
    "Procedure: \n",
    "\n",
    "1. Model the representative distribution (CDF)\n",
    "2. Draw a random value from a uniform [0,1] distribution (p-value)\n",
    "3. Apply the inverse of the CDF to calculate the associated realization\n",
    "\n",
    "In practice, Monte Carlo simulation refers to the workflow with multiple realizations drawn to buld an uncertainty model. \n",
    "\n",
    "\\begin{equation}\n",
    "X^\\ell = F_x(p^\\ell),  \\, \\forall \\, \\ell = 1,\\ldots, L\n",
    "\\end{equation}\n",
    "\n",
    "where $X^\\ell$ is the realization of the variable $X$ drawn from its CDF, $F_x$, with cumulative probability, p-value, $p^\\ell$.  \n",
    "\n",
    "It would be trivial to apply Monte Carlo simulation to a single variable, after many realizations one would get back the original distribution. The general approach is to:\n",
    "\n",
    "1. Model all distributions for the input, variables of interest $F_{x_1},\\ldots,F_{x_m}$.\n",
    "2. For each realization draw $p^\\ell_{1},\\ldots,p^\\ell_{m}$, p-values\n",
    "3. Apply the inverse of each distribution to calculate a realization of each variable, $X^\\ell_j = F_{x^\\ell_j}^{-1}(p^\\ell_j),  \\, \\forall \\, j = 1,\\ldots$, $m$ variables.\n",
    "4. Apply each set of variables for a $\\ell$ realization to the transfer function to calculate the ouptput realization, $Y^\\ell = F(X_1^\\ell,\\ldots,X_m^\\ell)$.\n",
    "\n",
    "Monte Carlo Simulation (MCS) is extremely powerful\n",
    "\n",
    "* Possible to easily simulate uncertainty models for complicated systems \n",
    "* Simulations are conducted by drawing values at random from specified uncertainty distributions for each variable\n",
    "* A single realization of each variable, $X_1^\\ell, X_2^\\ell,\\ldots,X_m^\\ell$ is applied to the transfer function to calculate the realization of the variable of interest (output, decision criteria):\n",
    "\n",
    "\\begin{equation}\n",
    "Y^\\ell = F(X_1^\\ell,\\ldots,X_m^\\ell), \\, \\forall \\, \\ell = 1,\\ldots, L\n",
    "\\end{equation}\n",
    "\n",
    "* The MCS method builds empirical uncertainty models by random sampling\n",
    "\n",
    "Let’s take a simple example, $OIP$ is oil-in-place calculated as the product of reservoir volume, $V$, average porosity, $\\overline{\\phi}$, and oil saturaton, $\\overline{s_o}$:\n",
    "\n",
    "\\begin{equation}\n",
    "OIP^\\ell = V^\\ell \\cdot \\overline{\\phi}^\\ell \\cdot \\overline{s_o}^\\ell, \\, \\forall \\, \\ell = 1,\\ldots, L\n",
    "\\end{equation}\n",
    "\n",
    "It would be difficult to directly calculate the OIP distribution as a combination of all these different distributions. \n",
    "* The distributions could all have different forms (parametric or non-parametric)\n",
    "* We use MCS to empirically work this out by sampling\n",
    "* Repeat to calculate enough realizations for analysis.\n",
    "\n",
    "How many realizations, $L$?\n",
    "\n",
    "The answer is enough! If the MCS computational cost is low then **many** is the right answer. If too few realizations are calculated then the summary statistics and the entire CDF of the output, decision criteria may be incorrect. This is caused by fluctuations due to not enough samples (see the 'Law of Small Numbers').\n",
    "\n",
    "The MCS method is very powerful. You can simulate output distributions that could not be calculated analytically.  \n",
    "\n",
    "#### Limitations\n",
    "\n",
    "The MCS method above assumes:\n",
    "1. **representativity** - the distribution is representative\n",
    "2. **independence** - the variables are independent of eachother\n",
    "3. **stationarity** - all realizations for each variable are from the same distribution \n",
    "\n",
    "#### Objective \n",
    "\n",
    "In the PGE 383: Stochastic Subsurface Modeling class I want to provide hands-on experience with building subsurface modeling workflows. Python provides an excellent vehicle to accomplish this. I have coded a package called GeostatsPy with GSLIB: Geostatistical Library (Deutsch and Journel, 1998) functionality that provides basic building blocks for building subsurface modeling workflows. \n",
    "\n",
    "The objective is to remove the hurdles of subsurface modeling workflow construction by providing building blocks and sufficient examples. This is not a coding class per se, but we need the ability to 'script' workflows working with numerical methods.    \n",
    "\n",
    "#### Getting Started\n",
    "\n",
    "Here's the steps to get setup in Python with the GeostatsPy package:\n",
    "\n",
    "1. Install Anaconda 3 on your machine (https://www.anaconda.com/download/). \n",
    "2. From Anaconda Navigator (within Anaconda3 group), go to the environment tab, click on base (root) green arrow and open a terminal. \n",
    "3. In the terminal type: pip install geostatspy. \n",
    "4. Open Jupyter and in the top block get started by copy and pasting the code block below from this Jupyter Notebook to start using the geostatspy functionality. \n",
    "\n",
    "There are examples below with these functions. You can go here to see a list of the available functions, https://git.io/fh4eX, other example workflows and source code. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [],
   "source": [
    "import geostatspy.GSLIB as GSLIB          # GSLIB utilies, visualization and wrapper\n",
    "import geostatspy.geostats as geostats    # GSLIB methods convert to Python        "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will also need some standard packages. These should have been installed with Anaconda 3."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np                        # ndarrys for gridded data\n",
    "import pandas as pd                       # DataFrames for tabular data\n",
    "import os                                 # set working directory, run executables\n",
    "import matplotlib.pyplot as plt           # for plotting\n",
    "from scipy import stats                   # summary statistics\n",
    "import math                               # trig etc.\n",
    "import random"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Set the working directory\n",
    "\n",
    "I always like to do this so I don't lose files and to simplify subsequent read and writes (avoid including the full address each time). "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {},
   "outputs": [],
   "source": [
    "os.chdir(\"c:/PGE383\")                     # set the working directory"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Simple Monte Carlo Simulation Example\n",
    "\n",
    "Let's work out the OIP uncertainty example above. Let's work with parametric distributions for average porosity, $apor$, volume, $vol$ and oil saturation, $so$. Here's some parameters for these distributions. Note, these parameters could originate from a bootstrap workflow, analogs, etc. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "apor_mean = 0.15; apor_stdev = 0.02       # Gaussian mean and standard deviation porosity (fraction)\n",
    "vol_mu = 13.0; vol_sigma = 0.5            # LogNormal mu and sigma volume (m^3)\n",
    "so_min = 0.2; so_max = 0.4                # Uniform minimum and maximum oil saturation (fraction)\n",
    "L = 1000                                  # Number of MCS realizations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's set the minimum and maximum values for plotting."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [],
   "source": [
    "apor_min = 0.1; apor_max = 0.2            # average porosity min and max\n",
    "vol_min = 0.0; vol_max = 4000000          # vol min and max"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the *NumPy* package we have handy methods for Monte Carlo simulation from parametric distributions. We can actually draw all $L$ realizations at once for each variable and store them in ndarrays (each ndarray with realizations $\\ell = 1,\\ldots,L$).  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [],
   "source": [
    "apor = np.random.normal(apor_mean, apor_stdev, size=L) # average porosity MCS simulation L times and store in array \n",
    "vol = np.random.lognormal(vol_mu, vol_sigma, size=L)   # volume ...\n",
    "so = np.random.uniform(so_min, so_max, size=L)         # saturation oil"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's plot the distributions of the realizations of each variable to make sure the match the form of the parametric distributions that we selected."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA5MAAAGWCAYAAADlvdcTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzs3XucZHV95//Xm5sogqMyEiKMqMFbRBFGnF2jIagJskYwiVFiFC9x9Bfd1dXdqKwbSWISk43xsmZVDAQwXL0QiTGJBEVikkFnFLnYGkAQkBFGoQVHdDLw+f1xTkNNTXV3VXdXV3f16/l41GPqXOqczznV9ZnzOed7vidVhSRJkiRJg9hl1AFIkiRJkpYfi0lJkiRJ0sAsJiVJkiRJA7OYlCRJkiQNzGJSkiRJkjQwi0lJkiRJ0sAsJrUkJfn7JCeMOo7ZJDkpyV+379ck+WGSXRd4Hc9I8s2FXKakmSU5MslNo45jmJIclKSS7NYODyXvJrkqyZELvVxJ8zesY5cB1v+hJP+7fT+yvJvk+iTPbt+fmOQvh7COe7d1nFhMLoAkFye5Pcn9Rh3LQmi358dtcvlekk8m2X8xY6iq51bV6W08L0/yxbkuK8lpSba123NbkguTPG7hom1U1Q1V9cCquns+y2kP7n6mY7n/XFWPnX+E0szGKZcl+XCSM3qMf1KSnyR5yCjiGlR7cHVPm7/uTPLNJK8Yxro68+5ctfn2nV3L/dmqunhewWlsjVPeAUjys0k+227TZJJNSY7p87MXJ/mtIc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byXpFwRBQSS9U913Wp9EGgUrfddPKu19kW8MU+6vrCWNbkJ3n6uc0cA6b9h9kjTAUKm8nNz36iCt7/xLjTo2YGargCXAmVn0mcBiv1YP95FmSNTLKGCd285PZPE3ASfChjXpm1O/3rV8zg2EfSxONCbbk2NJc9NzrqZr1665JEdovpm97HEXkobtF/tC5J9SuUf7BmBTSctJi6sXAZjZo8C3SVOz5ntZpekEp5AWXi+XdC/wuTeUWp3zSI5TJ2lKwzTr2iQi51rSWp9lwO9Ic+n/ROqdWurTZ48Ezs0zmdlTwO+VFrrP8LjHSYbsokoCWdogaLUvMq+H6cCVkm4FnszivwWM8bqXkdYIAPwMWC7fgKcOHavi09ReMLN1dcoaBEFqRL6HrqUCUN/393tSx10n8D1gMY1Rrx2eS1fnYKt4N3CH26KFwPfMrNOv7QksqjDlPwiC5hgJXCLpXvendgGmW9pl/gKSDbmOtFSnxMXA+b5xzAjgLOBc9y1q7ex8HmnUcxGpc7k0orcceNU3pin/t2bTcb+NtGHN8TTGCcBESaskrfZ6T6g3s08xHV1lSVQl/p3kf84D/pjFf4E0bbiTtI5010p+X0a9PmdO2MeClDYVCQIkjTSz9T4yeS3wCzMrb9S2PUq7gHWSNi2qOL9e0hGkTW3OrHS9XfAfiL+Y2c/7W5YgCFqDpMnAl8zsk31U37mkNVg39UV9QRAE7r88Z2YX9pi4Hwn7WJwYmQxypvvGEStIvfPX9bM8DSPpQFKv1o9qLdT2RvLavpKrAM8Al/S3EEEQtA4zWwLcrN7/378lVoSjFARBH/MTuq9TbFfCPhYkRiaDIAiCIAiCIAiChomRySAIgiAIgiAIgqBhojEZBEEQBEEQBEEQNEw0JoMgCIIgCIIgCIKGicZkEARBEARBEARB0DDRmAyCIAiCIAiCIAga5v8BsxcF73RE1R0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.subplot(131)\n",
    "GSLIB.hist_st(apor,apor_min,apor_max,log=False,cumul=False,bins=50,weights=None,xlabel=\"Average Porosity (fraction)\",title=\"Average Porosity Realizations\")\n",
    "plt.ylim(0.0,60)\n",
    "\n",
    "plt.subplot(132)\n",
    "GSLIB.hist_st(vol,vol_min,vol_max,log=False,cumul=False,bins=50,weights=None,xlabel=\"Volume (m^3)\",title=\"Average Volume Realizations\")\n",
    "plt.ylim(0.0,200)\n",
    "\n",
    "plt.subplot(133)\n",
    "GSLIB.hist_st(so,so_min,so_max,log=False,cumul=False,bins=50,weights=None,xlabel=\"Saturation Oil (fraction)\",title=\"Average Saturation Oil Realizations\")\n",
    "plt.ylim(0.0,40)\n",
    "\n",
    "plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.2)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This looks good, the shapes are Gaussian, lognormal and uniform and the central tendency and dispersion make sense given the parameters that we selected.\n",
    "\n",
    "Now we can use broadcast methods to calculate the output realizations of $OIP$, based on this equation.\n",
    "\n",
    "\\begin{equation}\n",
    "OIP^\\ell = V^\\ell \\cdot \\overline{\\phi}^\\ell \\cdot \\overline{s_o}^\\ell \\cdot 6.29 \\quad \\forall \\, \\ell = 1,\\ldots, L\n",
    "\\end{equation}\n",
    "\n",
    "where 6.26 $bbls/m^3$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAekAAAGWCAYAAABcunuDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xm8JGV97/HPV0ZQUByQwbDpgEGNK8tIxmiMintUzL0uGBNxicTELCa5iYBeNblxS4xb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61f5InAs8ELq+qx/RH3/+Sbmz1vwVeUFX7A0cBbx1Y/NKq+pWq+nO6+//+St/+XLrhC28GjgVeX1WPphvp6M1zlPo/VfWEqjp+Rvsj6O62NGiqb5/Pc/r1zfT4GcvbDjinqvYDTptR33ZV9Ut090Y+apZlvQl4Rn/k/rwZ9f3yBuqTmmdIS6Nz7yTfBn5Mdw/gU/r2p/ePbwHnAA+jC+1zgacmeWeSX66qa4CHAo8ETumX9UbuPLD/CTOev7h/fjBwQpL70QX5aX37McAT56j3hDnaZxPmvoPP1/tatwfePsv0XehuVznttoF1f5JuuNppxwFU1enA9rOc1/934OgkrwYGu+mvortTlLSgbfR5LElDu6Gq9umD8ot03cPvpwu4t1fVR2a+Icn+dOMnvz3JV4B/AM6vqsfNsY71A89P7t+3I7A/8DXgPhtR7/o52i8YWN60/fr22Tx5umt8DjfQjSs9l5rj+V1eV9Vrkvwi8KvAt5PsU1U/7pd/wzzrkBYEj6SlEeuPiP8A+D999/WXgVemu483SXZLsnOSXYGfVdUngXfRBeGFwLIkj+vnvWd/4dVs67me7iYI76O74cet/bp/mmS66/c36bqUN8ZfAe9Mcv++hn2AlwMf3MjlTFvFnc9V34M77rD068C/DUybPi//BLq7Bl0zuKAkD66qM6vqTXS3VJy+FeBD6G5+IC1oHklLY1BV30ryHeDgqvpEkl8Avtnd5Y7rgd+gC66/TnIb3Z17fqeqbuov7np/f0S+hO6+1efPsaoT6O5S9KSBtkOADyfZFrgYeMVG1n5ykt2A/0hSwHXAb9Qwt9mb3Zf6+qavLF8PPCLJ2cA13NFlD90XjP+g6zp/5SzL+uske9P1TpxKd14e4Mn9eqQFzbtgSRqrJPemuz/x46vq1hEsfxu63oInVNUtm3v50jgZ0pLGLskzgFVVdekIlr03sFtVfWNzL1saN0NakqRGeeGYJEmNMqQlSWqUIS1JUqMMaUmSGmVIS5LUqP8Px2Uysnvj24wAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "OIP = apor * vol * so * 6.29\n",
    "\n",
    "plt.subplot(111)\n",
    "GSLIB.hist_st(OIP,0.0,1000000,log=False,cumul=False,bins=50,weights=None,xlabel=\"Reservoir OIP (bbls)\",title=\"Reservoir OIP Realizations\")\n",
    "plt.ylim(0.0,175)\n",
    "plt.subplots_adjust(left=0.0, bottom=0.0, right=1.0, top=1.2, wspace=0.2, hspace=0.2)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It's not a bad idea to check your calculation. Let's compare the first and last realizations of $OIP$ to the results from performing the calculation by hand. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Check realization 0, broadcast method = 117394.232 compare to by-hand 117394.232\n",
      "Check realization L-1, broadcast method = 90446.182 compare to by-hand 90446.182\n"
     ]
    }
   ],
   "source": [
    "print('Check realization 0, broadcast method = ' + str(round(OIP[0],3)) + ' compare to by-hand ' + str(round(apor[0]*vol[0]*so[0]*6.29,3)))\n",
    "print('Check realization L-1, broadcast method = ' + str(round(OIP[L-1],3)) + ' compare to by-hand ' + str(round(apor[L-1]*vol[L-1]*so[L-1]*6.29,3)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The results check out.  \n",
    "\n",
    "Now let's look at what happens if too few realizations are used!  Set the $L$ smaller, calculate 3 sets of $L$ realizations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "L = 100                                                # set L small \n",
    "# First set of realizations\n",
    "apor = np.random.normal(apor_mean, apor_stdev, size=L) # average porosity MCS simulation L times and store in array \n",
    "vol = np.random.lognormal(vol_mu, vol_sigma, size=L)   # volume ...\n",
    "so = np.random.uniform(so_min, so_max, size=L)         # saturation oil\n",
    "OIP1 = apor * vol * so * 6.29                          # calculate OIP\n",
    "\n",
    "# Second set of realizations\n",
    "apor = np.random.normal(apor_mean, apor_stdev, size=L) # average porosity MCS simulation L times and store in array \n",
    "vol = np.random.lognormal(vol_mu, vol_sigma, size=L)   # volume ...\n",
    "so = np.random.uniform(so_min, so_max, size=L)         # saturation oil\n",
    "OIP2 = apor * vol * so * 6.29                          # calculate OIP\n",
    "\n",
    "# Third set of realizations\n",
    "apor = np.random.normal(apor_mean, apor_stdev, size=L) # average porosity MCS simulation L times and store in array \n",
    "vol = np.random.lognormal(vol_mu, vol_sigma, size=L)   # volume ...\n",
    "so = np.random.uniform(so_min, so_max, size=L)         # saturation oil\n",
    "OIP3 = apor * vol * so * 6.29                          # calculate OIP"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's look at the distributions, and calculate and compare the average for each of the 3 sets."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA5oAAAGWCAYAAAAZqPzZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xv8ZXVdL/7XWwZEQR3M0VBAvHC8JIkw2Zhm3m/HW+dYalnYRbT0lKd+HdHjMezYxdL0VJZiGqh5v6TZxRRvWYINioKOBogJgjJaIzKSKHx+f6w1uhm+3+/s78zae3/Xd57Px2M/Zu/PWnut917f7/cF77XXpVprAQAAgKHcYNEFAAAAsL5oNAEAABiURhMAAIBBaTQBAAAYlEYTAACAQWk0AQAAGJRGcx2rqqOq6sqqOmDRtcxDVX2hqh7UP39OVf35DNbx8qr6P0MvF7g+GSbDYMxkmAzb32k0V9D/wVzVh8SXq+q0qjp00XVNq7X2xdbaoa21a1bzvqp6clWdW1Xf7D/3n1XVxonpp1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/mSU5I8v4kh66i3p3LjH9mYnm7HN+PL+X+uw7vWMZVSQ5eYXpb5vn1XrfWnlZVP5zkvyY5p6qOa619rV/+VSusA9gzGbY0GQbjIMOWJsP2A77R3E/0e8R+Jcn/1x+C8Z4kP19VhyZJVd2mqm5ZVbdO8s3W2uuSvChdiHwuyaaqulc/74HVncS91HquTPKxJP8vybtba9f06/6Pqtp1+MLPpDssYjV+P8kLq+r7+hqOS/LkJH+6yuXssi3XPWfgBkke1z//qSQfmZi26/yI+yT5ev95vquq7tBaO6u19rwkX01yZD/pvyQ5by/rAybIsOuRYTAiMux6ZNh+wDea+5HW2ieq6pNJntBae21V3SXJR6sqSa5M8qR0f/R/UFXXJvl2kl9qrV3dnyj+R/0euQ1JXprk08us6k1J3pLkfhNjJyZ5eVXdOMnnk/zcKmt/V1XdJsk/V1VL8o0kT2qtXbaa5Uz4m76+XVda25nkB6rq7CRfz/cOO0m6cP7ndId//PwSy/qDqjom3d7JM9KdH5Ek9+/XAwxAhl2HDIORkWHXIcP2A9XacodWw/pVVTdK8oEk926tXTOD5d8w3d7C+7TWvjP08oH9mwwDxkyG7R80muy3quqhSba11r44g2Ufk+Q2rbUPDr1sgESGAeMmw9Y/jSYAAACDcjEgAAAABqXRBAAAYFAaTQAAAAal0QQAAGBQGk0AAAAG9f8D0vKAKD2w9xMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 3 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The average OIP for large number of realizations = 138352.546\n",
      "The average OIP for small number of realizations = 156296.224, 141280.388,134355.572\n"
     ]
    }
   ],
   "source": [
    "plt.subplot(131)\n",
    "GSLIB.hist_st(OIP1,0.0,1000000,log=False,cumul=False,bins=20,weights=None,xlabel=\"Reservoir OIP (bbls)\",title=\"Reservoir OIP Realizations, Set 1\")\n",
    "plt.ylim(0.0,40)\n",
    "\n",
    "plt.subplot(132)\n",
    "GSLIB.hist_st(OIP2,0.0,1000000,log=False,cumul=False,bins=20,weights=None,xlabel=\"Reservoir OIP (bbls)\",title=\"Reservoir OIP Realizations, Set 2\")\n",
    "plt.ylim(0.0,40)\n",
    "\n",
    "plt.subplot(133)\n",
    "GSLIB.hist_st(OIP3,0.0,1000000,log=False,cumul=False,bins=20,weights=None,xlabel=\"Reservoir OIP (bbls)\",title=\"Reservoir OIP Realizations, Set 3\")\n",
    "plt.ylim(0.0,40)\n",
    "\n",
    "plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.2)\n",
    "plt.show()\n",
    "\n",
    "print('The average OIP for large number of realizations = ' + str(round(np.average(OIP),3)))\n",
    "print('The average OIP for small number of realizations = ' + str(round(np.average(OIP1),3)) + ', ' + str(round(np.average(OIP2),3)) + ',' + str(round(np.average(OIP3),3)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Try setting the number of realizations, $L$, larger and you will see that the 3 sets of realizations converge, they become stable. This is why we set $L$ large. \n",
    "\n",
    "#### Non-Parametric Monte Carlos Simulation\n",
    "\n",
    "I have demonstrated the case of MCS with parametric distributions. Of course, we may have non-parametric distributions. In this case we are working with a list of values (typically in an 1D ndarray). For this case we simply substitute in the command:\n",
    "\n",
    "```p\n",
    "apor = np.random.choice(array_average_porosity,size=L)\n",
    "```\n",
    "\n",
    "The result is a ndarray with $L$ Monte Carlo simulations from the array 'array_average_porosity'.  This is simply $L$ random draws with replacement (so the same value may be selected again), from the list of values in the ndarray."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Comments\n",
    "\n",
    "This was a basic demonstration of Monte Carlo simulation for uncertainty analysis. A lot more could be done, for example, more complicated transfer functions and a combination of non-parametric and parametric distributions. Also, one could integrate relationships between the variables (we assumed independent here).\n",
    "\n",
    "I have other demonstrations on the basics of working with DataFrames, ndarrays, univariate statistics, plotting data, declustering, data transformations, trend modeling, multivariate analysis and many other workflows available at https://github.com/GeostatsGuy/PythonNumericalDemos and https://github.com/GeostatsGuy/GeostatsPy. \n",
    "  \n",
    "I hope this was helpful,\n",
    "\n",
    "*Michael*\n",
    "\n",
    "Michael Pyrcz, Ph.D., P.Eng. Associate Professor The Hildebrand Department of Petroleum and Geosystems Engineering, Bureau of Economic Geology, The Jackson School of Geosciences, The University of Texas at Austin\n",
    "\n",
    "#### More Resources Available at: [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleScholar](https://scholar.google.com/citations?user=QVZ20eQAAAAJ&hl=en&oi=ao) | [Book](https://www.amazon.com/Geostatistical-Reservoir-Modeling-Michael-Pyrcz/dp/0199731446) | [YouTube](https://www.youtube.com/channel/UCLqEr-xV-ceHdXXXrTId5ig)  | [LinkedIn](https://www.linkedin.com/in/michael-pyrcz-61a648a1)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
